package com.googlecode.jlsf.swing;

import java.awt.Image;
import java.util.ResourceBundle;

import javax.swing.Icon;
import javax.swing.ImageIcon;

/**
 * GUI resources manager
 */
public class ResourceManager 
{
	private static final ResourceBundle BUNDLE = ResourceBundle.getBundle(
			ResourceManager.class.getPackage().getName() + ".resources.resources");
	
	protected static String getString(String key)
	{
		return BUNDLE.getString(key);
	}	
	
	protected static Icon getIcon(String name)
	{		
		return new ImageIcon(ResourceManager.class.getResource("resources/" + name));
	}

	protected static Image getImage(String name)
	{		
		return new ImageIcon(ResourceManager.class.getResource("resources/" + name)).getImage();
	}
}
